-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
front: fix displayed op on manchette #10334
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10334 +/- ##
==========================================
- Coverage 81.62% 81.59% -0.03%
==========================================
Files 1067 1067
Lines 105624 105635 +11
Branches 727 732 +5
==========================================
- Hits 86216 86194 -22
- Misses 19367 19400 +33
Partials 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -20,7 +20,7 @@ import { formatData } from './helpers'; | |||
export type SpeedSpaceChartContainerProps = { | |||
trainSimulation: SimulationResponseSuccess; | |||
selectedTrainPowerRestrictions?: LayerData<PowerRestrictionValues>[]; | |||
pathProperties: PathPropertiesFormatted; | |||
pathProperties?: PathPropertiesFormatted; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think it makes sense to have a speed space chart without path properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I fixed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great ! Good job !
I just left one comment
@@ -35,7 +35,7 @@ export const upsertMapWaypointsInOperationalPoints = ( | |||
}, | |||
part: { track: step.track, position: step.offset }, | |||
position: positionOnPath, | |||
weight: null, | |||
weight: 100, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid magic numbers and because it's also used in useGetProjectedTrainOperationalsPoints maybe we should use a const like 'HIGHEST_PRIORITY_WEIGHT' here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed !
@@ -15,38 +15,53 @@ export const upsertMapWaypointsInOperationalPoints = ( | |||
t: TFunction | |||
): OperationalPoint[] => { | |||
let waypointCounter = 1; | |||
const HIGHEST_PRIORITY_WEIGHT = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be outside of the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
} | ||
setFilteredOperationalPoints(operationalPointsWithUniqueIds); | ||
setFilteredOperationalPoints(operationalPointsWithAllWaypoints); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should change this. Otherwise, we won't have any waypoint checked in the waypoint panel.
We should ask @Tguisnet if on linear mode of the manchette, we now want to view all points or just some of them if a weight superior than a specific number etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where it comes from, but there is a white screen if we try to switch to linear mode in the manchette
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed ! It came from pushing the OP to the end of the list rather than adding it to the index when given the weight of 100
Signed-off-by: Theo Macron <[email protected]>
Signed-off-by: Theo Macron <[email protected]>
e08bc04
to
a598a58
Compare
Set the weight of the main PRs (origin, arrival and vias) to 100.
For vias added by hand from the map, they were previously set to “null”, now they're set to 100, so they're displayed on the manchette.
Tests :